package com.tiancheng.trade.order.enums;

import com.tiancheng.trade.commom.core.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 设备类型枚举
 *
 * @author kellen
 * @date 2024/3/3
 */
@Getter
@AllArgsConstructor
public enum DeviceTypeEnum implements BaseEnum<String> {

	ios("ios", "ios"),
	android("android", "安卓"),
	miniapp("wxapp", "微信小程序"),
	;

	private String code;
	private String desc;

	public static String getDesc(String code) {
		DeviceTypeEnum[] businessModeEnums = values();
		for (DeviceTypeEnum statusEnum : businessModeEnums) {
			if (statusEnum.code().equals(code)) {
				return statusEnum.desc();
			}
		}
		return null;
	}

	public String code() {
		return this.code;
	}

	public String desc() {
		return this.desc;
	}
}
